


<!DOCTYPE html>
<html id="htmlId">
<head>
  <title>Coverage Report > Direction</title>
  <style type="text/css">
    @import "../../css/coverage.css";
    @import "../../css/idea.min.css";
  </style>
  <script type="text/javascript" src="../../js/highlight.min.js"></script>
  <script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>

<body>
<div class="content">
<div class="breadCrumbs">
Current scope:     <a href="../../index.html">all classes</a>
    <span class="separator">|</span>
    <a href="../index.html">nl.tudelft.jpacman.board</a>
</div>

<h1>Coverage Summary for Class: Direction (nl.tudelft.jpacman.board)</h1>

<table class="coverageStats">
<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Class, %
</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">Direction</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (1/1)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (4/4)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    100%
  </span>
  <span class="absValue">
    (11/11)
  </span>
</td>
</tr>

</table>

<br/>
<br/>


<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package nl.tudelft.jpacman.board;
&nbsp;
&nbsp;/**
&nbsp; * An enumeration of possible directions on a two-dimensional square grid.
&nbsp; *
&nbsp; * @author Jeroen Roosen 
&nbsp; */
<b class="fc">&nbsp;public enum Direction {</b>
&nbsp;
&nbsp;    /**
&nbsp;     * North, or up.
&nbsp;     */
<b class="fc">&nbsp;    NORTH(0, -1),</b>
&nbsp;
&nbsp;    /**
&nbsp;     * South, or down.
&nbsp;     */
<b class="fc">&nbsp;    SOUTH(0, 1),</b>
&nbsp;
&nbsp;    /**
&nbsp;     * West, or left.
&nbsp;     */
<b class="fc">&nbsp;    WEST(-1, 0),</b>
&nbsp;
&nbsp;    /**
&nbsp;     * East, or right.
&nbsp;     */
<b class="fc">&nbsp;    EAST(1, 0);</b>
&nbsp;
&nbsp;    /**
&nbsp;     * The delta x (width difference) to an element in the direction in a grid
&nbsp;     * with 0,0 (x,y) as its top-left element.
&nbsp;     */
&nbsp;    private final int deltaX;
&nbsp;
&nbsp;    /**
&nbsp;     * The delta y (height difference) to an element in the direction in a grid
&nbsp;     * with 0,0 (x,y) as its top-left element.
&nbsp;     */
&nbsp;    private final int deltaY;
&nbsp;
&nbsp;    /**
&nbsp;     * Creates a new Direction with the given parameters.
&nbsp;     *
&nbsp;     * @param deltaX
&nbsp;     *            The delta x (width difference) to an element in the direction
&nbsp;     *            in a matrix with 0,0 (x,y) as its top-left element.
&nbsp;     * @param deltaY
&nbsp;     *            The delta y (height difference) to an element in the direction
&nbsp;     *            in a matrix with 0,0 (x,y) as its top-left element.
&nbsp;     */
<b class="fc">&nbsp;    Direction(int deltaX, int deltaY) {</b>
<b class="fc">&nbsp;        this.deltaX = deltaX;</b>
<b class="fc">&nbsp;        this.deltaY = deltaY;</b>
<b class="fc">&nbsp;    }</b>
&nbsp;
&nbsp;    /**
&nbsp;     * @return The delta x (width difference) for a single step in this
&nbsp;     *         direction, in a matrix with 0,0 (x,y) as its top-left element.
&nbsp;     */
&nbsp;    public int getDeltaX() {
<b class="fc">&nbsp;        return deltaX;</b>
&nbsp;    }
&nbsp;
&nbsp;    /**
&nbsp;     * @return The delta y (height difference) for a single step in this
&nbsp;     *         direction, in a matrix with 0,0 (x,y) as its top-left element.
&nbsp;     */
&nbsp;    public int getDeltaY() {
<b class="fc">&nbsp;        return deltaY;</b>
&nbsp;    }
&nbsp;}
</code>
</pre>
</div>

<script type="text/javascript">
(function() {
    var msie = false, msie9 = false;
    /*@cc_on
      msie = true;
      @if (@_jscript_version >= 9)
        msie9 = true;
      @end
    @*/

    if (!msie || msie && msie9) {
      hljs.highlightAll()
      hljs.initLineNumbersOnLoad();
    }
})();
</script>

<div class="footer">
    
    <div style="float:right;">generated on 2023-04-11 19:46</div>
</div>
</body>
</html>
